Correction of alignment and linearity errors in a stylus input system

ABSTRACT

A method and system for correcting alignment and linearity errors in devices using a finger or stylus input device with a display device interactively coupled to a digitizer is disclosed. Touching intersections in a calibration grid on the display device may be performed to create a linearity map. Subsequently, detected stylus input is mapped to a sector in the linearity map, and resultant screen coordinates are calculated using ratios within a reference rectangle corresponding to the detected stylus input and the mapped sector.

This application is a continuation of and claims priority fromapplication Ser. No. 09/918,482, filed Aug. 1, 2001, now U.S. Pat. No.6,727,896, of the same title.

FIELD OF THE INVENTION

One or more aspects of the invention relates to computing devices usinga stylus input device. More specifically, aspects of the inventionrelate to a method and system for correcting alignment and linearityerrors when a stylus digitizer is used in combination with a displayscreen to provide input to a computing system.

BACKGROUND OF THE INVENTION

Portable computing systems, such as personal digital assistants (PDA),often have a stylus or other pen-like input device for receiving userinput. For instance, a user may use a pen-like stylus to interact with aPDA by pressing the stylus against a display screen. The display screenis generally an LCD display. Depending on the type of digitizer used,the user may physically touch the stylus to the LCD display screen orbring the stylus close to the screen so that the digitizer can detectthe presence of the stylus. The digitizer would then detect the stylusproximity or contact and translate it into a location on the display.The PDA further processes the location to determine how to respond tothe user input.

In order to capture a user's input regardless of where the user placesthe stylus on the LCD display, digitizers typically are larger than thedimensions of the LCD display itself. That is, the digitizer generallyextends beyond the area of the LCD display, as shown in FIG. 3, suchthat the digitizer can better detect when the user places the stylus ator near the edges of the LCD display.

Because the digitizer generally encompasses a larger area than the LCDdisplay, the system using the digitizer and display must map the user'sinput from the digitizer to the LCD. For instance, if the user placesthe stylus at LCD pixel location 0,0, it generally does not correspondto digitizer position 0,0 because the digitizer extends beyond thedimensions of the display, as discussed above and shown in FIG. 3. Thedigitizer position corresponding to 0,0 on the LCD may actually be aposition such as 100,100, depending on the resolution of the digitizer.

Mapping between the digitizer and the LCD is further complicated by thefact that digitizers and LCD displays often have different resolutions.Typical display resolutions extend from less than 600×400 pixels to1280×1024 pixels and higher, with multiple resolutions possible onvarious sized display screens. Digitizers, also, are created withvarious levels of resolution. For instance, digitizers generally haveresolutions between 100 and 1000 pixels per inch. However, higher orlower resolutions are also possible. Because of these resolutiondifferences between the LCD display and the digitizer, there istypically not a 1-to-1 mapping between the LCD display and thedigitizer. Thus, complicated calculations are often required to map fromthe digitizer to the display.

Digitizers used to detect stylus input generally include resistivedigitizers and radio frequency (RF) digitizers, both of which are knownin the art. Both types of digitizers sense the location that a userplaces the stylus on a display device. However, an RF digitizer cansense the stylus even when it is not touching the display device. RFdigitizers may have various degrees of sensitivity, such that thedigitizer may sense the RF stylus when it is within an approximatedistance from the digitizer, such as within one inch of the digitizer,within 6 inches, within ½ inch, or other similar measure, which mayresult in the digitizer sensing the stylus before it actually contactsthe display device.

However, input problems with the stylus can occur because anelectromagnetic-based pen digitizer is non-linear, especially close toits edges and comers. This can be caused by field distortion from theinterference of a metal frame and/or other electronics around the edges.Interference may also come from electronic components placed beneath thedigitizer. FIG. 4 shows lines drawn using a straight edge ruler on adevice that has no linearity compensation. If the digitizer is usedindependently without an LCD display on top, a user may not notice thelinearity problem because the resultant input is not displayed. However,when used with an LCD display on top, the user will notice that thestylus tip aligns with the detected input position very well in someareas but that they drift apart in other areas, such as area 250, causedby a hard disk drive located beneath the digitizer. This distortion cancreate a usability problem because the user may not be able toaccurately interact with the computing device, causing the user tobecome frustrated and stop using the device.

Known previous methods have attempted to compensate for alignmentdifferences, but have neglected linearity problems. For instance, knownalignment methods use two to five point alignment. That is, a computerdevice prompts the user to interact with the display using the stylusinput device two to five times at various locations to establish theoffset and alignment parameters between the digitizer and the displaydevice. While this may correct the alignment between the digitizer andLCD, linearity problems remain unresolved.

While digitizer manufacturers have included limited linearity correctionbuilt-in to digitizer firmware, these digitizers often do not containenough processing power or memory to fully compensate in areas a highdistortion. Thus, a solution is needed that can correct for alignmentand linearity errors when an LCD or other display device is used inconjunction with a pen digitizer to receive user input in a computingsystem.

BRIEF SUMMARY OF THE INVENTION

Aspects of the invention provide a flexible and efficient method andsystem for correcting alignment and linearity errors in a device thatuses a stylus input device. In a first aspect of the invention, there isa linearity map including an array of data points, wherein each datapoint comprises data corresponding to known screen coordinates andcorresponding input coordinates.

In a further aspect of the invention, there is a method of creating alinearity map. A data processing system displays a calibration grid on adisplay device connected to a digitizer such that user input may beprovided by interacting directly with the display device. A stylus inputdevice is used to touch each intersection in the calibration griddisplayed on the screen while the digitizer detects the inputcoordinates for each intersection. The system records eachintersection's screen coordinates and corresponding detected digitizercoordinates in the linearity map.

In a further aspect of the invention, there is a method for correctinginput errors in a data processing system using a stylus input device anda digitizer. The digitizer detects input from the stylus input device.The data processing system then determines in which sector of alinearity map the detected stylus input is located, and calculates areference rectangle based on the detected point in the sector. Thesystem then may calculate a screen point corresponding to the stylusinput point based on the reference rectangle and the linearity map. Themethod may be embodied in computer readable instructions stored on acomputer readable medium.

In a further aspect of the invention, there is a data processing systemincluding a stylus input device, a digitizer, a display screen on top ofthe digitizer, a processor, and a memory storing computer readableinstructions that, when executed by the processor, cause the dataprocessing system to perform a set of steps. The digitizer detects inputfrom the stylus input device. The data processing system then determinesin which sector of a linearity map the detected stylus input is located,and calculates a reference rectangle based on the detected point in thesector. The system then may calculate a screen point corresponding tothe stylus input point based on the reference rectangle and thelinearity map.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an exemplary computing environment in which one ormore embodiments of the present invention may be implemented.

FIG. 2 illustrates an exemplary tablet computer configuration on whichone or more embodiments of the present invention may be implemented.

FIG. 3 illustrates a perspective view of a display device over a pendigitizer.

FIG. 4 illustrates input on a display device that has no linearitycompensation.

FIG. 5 illustrates a flowchart of a method of performing linearitycompensation according to one embodiment of the invention.

FIG. 6A illustrates a uniform calibration grid.

FIG. 6B illustrates a non-uniform calibration grid.

FIG. 7 illustrates a type definition of a linearity map for use in oneembodiment of the invention.

FIG. 8 illustrates a graphical depiction of linearity map calibrationinput for a portion of a calibration grid in one embodiment of theinvention.

FIG. 9 illustrates an enlarged section of a linearity map overlaid on acalibration grid in one embodiment of the invention.

FIG. 10 illustrates a portion of a linearity map whose sectors have beenmaximized according to one embodiment of the invention.

FIG. 11 illustrates a detected stylus point with a reference rectanglein a sector of a linearity map according to one embodiment of theinvention.

FIG. 12 illustrates a reference rectangle when a detected stylus pointis in a maximized sector other than its actual sector.

FIG. 13 illustrates computer instructions to calculate X and Y screencoordinates according to one embodiment of the invention.

FIG. 14 illustrates input on display device using linearity compensationaccording to one embodiment of the invention.

DETAILED DESCRIPTION OF THE INVENTION

Embodiments and aspects of the present invention may be more readilydescribed with reference to FIGS. 1–14. FIG. 1 illustrates a schematicdiagram of a conventional general-purpose digital computing environmentthat can be used to implement various aspects of the present invention.In FIG. 1, a computer 100 includes a processing unit 110, a systemmemory 120, and a system bus 130 that couples various system componentsincluding the system memory to the processing unit 110. The processingunit 110 may include one or more processors. The system bus 130 may beany of several types of bus structures including a memory bus or memorycontroller, a peripheral bus, and a local bus using any of a variety ofbus architectures. The system memory 120 includes read only memory (ROM)140 and random access memory (RAM) 150.

A basic input/output system 160 (BIOS), containing the basic routinesthat help to transfer information between elements within the computer100, such as during start-up, is stored in the ROM 140. The computer 100also includes a hard disk drive 170 for reading from and writing to ahard disk (not shown), a magnetic disk drive 180 for reading from orwriting to a removable magnetic disk 190, and an optical disk drive 191for reading from or writing to a removable optical disk 192 such as a CDROM or other optical media. The hard disk drive 170, magnetic disk drive180, and optical disk drive 191 are connected to the system bus 130 by ahard disk drive interface 192, a magnetic disk drive interface 193, andan optical disk drive interface 194, respectively. The drives and theirassociated computer-readable media provide nonvolatile storage ofcomputer readable instructions, data structures, program modules andother data for the personal computer 100. It will be appreciated bythose skilled in the art that other types of computer readable mediathat can store data that is accessible by a computer, such as magneticcassettes, flash memory cards, digital video disks, Bernoullicartridges, random access memories (RAMs), read only memories (ROMs),and the like, may also be used in the example operating environment.

A number of program modules can be stored on the hard disk drive 170,magnetic disk 190, optical disk 192, ROM 140 or RAM 150, including anoperating system 195, one or more application programs 196, otherprogram modules 197, and program data 198. A user can enter commands andinformation into the computer 100 through input devices such as akeyboard 101 and pointing device 102. Other input devices (not shown)may include a microphone, joystick, game pad, satellite dish, scanner orthe like. These and other input devices are often connected to theprocessing unit 110 through a serial port interface 106 that is coupledto the system bus, but may be connected by other interfaces, such as aparallel port, game port or a universal serial bus (USB). Further still,these devices may be coupled directly to the system bus 130 via anappropriate interface (not shown). A display device 107 such as amonitor, LCD display, or other type of display device is also connectedto the system bus 130 via an interface, such as a video adapter 108. Inaddition to the monitor, personal computers typically include otherperipheral output devices (not shown), such as speakers and printers. Ina preferred embodiment, a pen digitizer 165 and accompanying pen orstylus 166 are provided in order to digitally capture freehand input.Although a direct connection between the pen digitizer 165 and theprocessing unit 110 is shown, in practice, the pen digitizer 165 may becoupled to the processing unit 110 via a serial port, parallel port orother interface and the system bus 130 as known in the art. Furthermore,although the digitizer 165 is shown apart from the monitor 107, it ispreferred that the usable input area of the digitizer 165 beco-extensive with the display area of the monitor 107. Further still,the digitizer 165 may be integrated in the monitor 107, or may exist asa separate device overlaying or otherwise appended to the monitor 107.

The computer 100 can operate in a networked environment using logicalconnections to one or more remote computers, such as a remote computer109. The remote computer 109 can be a server, a router, a network PC, apeer device or other common network node, and typically includes many orall of the elements described above relative to the computer 100,although only a memory storage device 111 has been illustrated inFIG. 1. The logical connections depicted in FIG. 1 include a local areanetwork (LAN) 112 and a wide area network (WAN) 113. Such networkingenvironments are commonplace in offices, enterprise-wide computernetworks, intranets and the Internet.

When used in a LAN networking environment, the computer 100 is connectedto the local network 112 through a network interface or adapter 114.When used in a WAN networking environment, the personal computer 100typically includes a modem 115 or other means for establishing acommunications over the wide area network 113, such as the Internet. Themodem 115, which may be internal or external, is connected to the systembus 130 via the serial port interface 106. In a networked environment,program modules depicted relative to the personal computer 100, orportions thereof, may be stored in the remote memory storage device.

It will be appreciated that the network connections shown are examplesand other techniques for establishing a communications link between thecomputers can be used. The existence of any of various well-knownprotocols such as TCP/IP, Ethernet, FTP, HTTP and the like is presumed,and the system can be operated in a client-server configuration topermit a user to retrieve web pages from a web-based server. Any ofvarious conventional web browsers can be used to display and manipulatedata on web pages.

Although the FIG. 1 environment shows an example environment, it will beunderstood that other computing environments may also be used. Forexample, one or more embodiments of the present invention may use anenvironment having fewer than all of the various aspects shown in FIG. 1and described above, and these aspects may appear in variouscombinations and subcombinations that will be apparent to one ofordinary skill.

FIG. 2 illustrates a tablet personal computer (PC) 201 that can be usedin accordance with various aspects of the present invention. Any or allof the features, subsystems, and functions in the system of FIG. 1 canbe included in the computer of FIG. 2. Tablet PC 201 includes a largedisplay surface 202, e.g., a digitizing flat panel display, preferably,a liquid crystal display (LCD) screen, on which a plurality of windows203 is displayed. Using stylus 204, a user can select, highlight, andwrite on the digitizing display area. Examples of suitable digitizingdisplay panels include electromagnetic pen digitizers, such as the Mutohor Wacom pen digitizers. Other types of pen digitizers, e.g., opticaldigitizers, may also be used. Tablet PC 201 interprets marks made usingstylus 204 in order to manipulate data, enter text, and executeconventional computer application tasks such as spreadsheets, wordprocessing programs, and the like.

A stylus could be equipped with buttons or other features to augment itsselection capabilities. In one embodiment, a stylus could be implementedas a “pencil” or “pen”, in which one end constitutes a writing portionand the other end constitutes an “eraser” end, and which, when movedacross the display, indicates portions of the display are to be erased.Other types of input devices, such as a mouse, trackball, or the likecould be used. Additionally, a user's own finger could be used forselecting or indicating portions of the displayed image on atouch-sensitive or proximity-sensitive display. Consequently, the term“user input device”, as used herein, is intended to have a broaddefinition and encompasses many variations on well-known input devices.

For exemplary purposes within this disclosure, a display device with adisplay resolution of 1024×768 and a digitizer with a resolution of 1000pixels/inch are used. However, it will be understood that one may easilyadapt one or more embodiments of the present invention for displaydevices and digitizers with other resolutions. The combination of adisplay device placed over a digitizer may be referred to as an LCDDigitizer.

FIG. 5 shows a flowchart of a method for performing linearitycompensation according to one embodiment of the invention. Initially, instep 501, a linearity map is created. The linearity map reduceslinearity errors to produce easier and more accurate user input andusability, as described below. In one embodiment of the invention, thelinearity map may be a two-dimensional grid of calibrated points used tocalculate the compensation for the actual position of a stylus tip on anLCD Digitizer. The map may be a two-dimensional array of points whereeach point contains a predetermined screen point and the correspondingstylus input point acquired in a calibration process, described in moredetail below. The array of points creates sectors, defined by fourpoints in the calibration grid that define a square. It should beunderstood that other calibration grids may contain sectors of varyingshapes and sizes. When the system detects stylus input in step 503, thesystem queries the linearity map in step 505 to find the sectorcontaining the stylus input point. In step 507 the system uses the dataof the four comers of the sector to create a containing rectangle,referred to as a reference rectangle, and performs a linearinterpolation to map the input to the corresponding screen location instep 509, further described below.

Further embodiments may also be adapted to accommodate non-linear aswell as linear maps. A non-linear map, shown in FIG. 6B, is one thatuses denser data points in higher distortion areas on an LCD than inlower distortion areas in order to provide better linearity compensationin the high distortion areas. Hardware with high distortion areas, e.g.due to a hard disk drive, may use a non-linear map. For exemplarypurposes, a linear map is used.

Linearity maps with higher resolution generally produce better linearitycompensation. However, as the resolution of the linearity map approachesthe resolution of the display device, more processor time and speed isrequired to perform various lookup functions and data calculations. Forexample, some high-resolution pen tablets have data rates greater than120 points detected per second. Because compensation is generallyperformed for each stylus input point detected, data processing forlinearity maps with high resolutions will quickly consume systemprocessor time and other system resources. Conversely, as the linearitymap's resolution gets lower, less system resources are used butlinearity compensation is less accurate. Thus, a resolution should beused that produces acceptable linearity compensation with a minimumeffect on system resources.

In one method that may be used to create a linearity map, a calibrationapplication displays a two-dimensional calibration grid of screenpoints, similar to that shown in FIG. 6A. In this example, thecalibration grid is a 32×24 grid with 713 sectors. After the grid isdisplayed, the user taps on each intersection point of the grid usingthe stylus input device. Alternatively, the user may opt not to tap oneach intersection point, depending on system characteristics andinterference patterns from underlying hardware. That is, a user maychoose to tap, or the system may instruct the user to tap, on everyother intersection point in areas subject to less distortion, and everyintersection point in areas subject to higher distortion, thus creatinga non-linear map. It should be appreciates that various ways of creatingthe linearity map are possible.

Alternatively, the calibration process may be automated during themanufacturing process so that users do not need to initially performcalibration when they receive a computing device enabled with linearitycorrection. In such devices, the user may have the option ofre-calibrating the device upon request.

The calibration application records the stylus coordinates as the usertouches each screen intersection point and generates a two-dimensionallinearity map data array, a C/C++ definition of one example is shown inFIG. 7. FIG. 8 shows a graphical representation of a portion of thecalibration input for area 250 used to create the linearity map. As isevident in FIG. 8, the detected digitizer point may not exactly matchthe calibration grid point displayed on the screen.

The linearity map may then be used to map every detected stylus input toa corresponding screen point according to a predetermined algorithm.Before the stylus point can be mapped to a screen point, however, thesector of the linearity map containing each detected stylus point islocated. Searching all 713 sectors to locate which one sector containseach detected stylus input would be tedious and unnecessarily consumesystem resources. Thus, a more efficient search algorithm should beused.

In one embodiment, the algorithm used may be based on the assumptionthat a subsequent stylus input point is most likely to be in the samesector as the previous stylus input point or, if not in the same sector,is in one of its eight adjacent neighbor sectors. By using thisassumption, a loop to find the next stylus input point sector thatstarts from the previous stylus input point sector will execute one ortwo iterations most of the time. During each iteration, the algorithmdetermines whether it needs to move horizontally, vertically, ordiagonally by comparing the target coordinates to the currentcoordinates. Even in a worst case scenario, where the user starts at onecorner of the screen and pulls the stylus out of proximity of thedigitizer tablet and moves the stylus back within the proximity of thedigitizer at the opposite comer of the screen, the algorithm will not domore than max(NUM_LINEAR_XPTS, NUM_LINEAR_YPTS) iterations to locate thenext stylus point sector. That is, the algorithm will only need toperform iterations equal to the greater of the number of X grid pointsor the number of Y grid points, minus one. Thus, using the exemplary32×24 grid, the maximum number of iterations would be 31 (i.e. 32−1=31).This algorithm is especially applicable when the user is providingwritten input using the stylus, such that the input is approximatelycontinuous and flowing in nature. In environments where the user is notwriting, or input is more random, other search algorithms may be used.

FIG. 9 shows four enlarged sectors of the linearity map. The calibrationpoints of each sector (black dots) might not form a perfect rectangle,as do the corresponding screen points (white dots), because of theaforementioned linearity errors during the calibration process. Thus,when a user provides input using the stylus, it is often difficult todetermine the sector in which the detected stylus input 801 is located.Because each sector might not be a rectangle, further calculations maybe needed to determine whether a detected input is in a given sector.

With reference to FIG. 10, in order to place the detected stylus pointin a sector while using less system resources than performing an exactcalculation of the sector polygon, the rectangle bounding each sectormay be maximized using the four comers of the sector, and the detectedstylus point is placed in any sector in whose bounding rectangle it islocated. FIG. 10 shows four enlarged sectors of the linearity map whereeach sector has been maximized. If a given stylus point 901 is near theborderline of the two adjacent sectors G and H, it may be placed ineither sector, as it is located in each of the maximized sectors G andH. This is acceptable because the method to interpolate the mapping fromdigitizer to LCD using the sector comers can also extrapolate.

With reference to FIG. 11, one embodiment of the invention may calculatea reference rectangle 301 from the stylus point's four intersectionpoints 303, 305, 307, 309 with the sector 311 in which the target styluspoint (X_(pen), Y_(pen),) is located. The reference rectangle may thenbe used to calculate the linearity compensation. The reference rectangle301 has left side (x1), right side (x2), top (y1) and bottom (y2), eachof which may be calculated using known geometric principles.

For example, to calculate x1 the algorithm first intersects the linedefined by (i_(x),i_(y)), (i_(x),i_(y+1)) with the horizontal linedefined by Y_(pen). The known ratio “vertical distance between Y_(pen)and the point (i_(x),i_(y))” to “vertical distance between the point(i_(x),i_(y+1)) and the point (i_(x),i_(y))” should be the same as theratio “horizontal distance between x1 and the point (i_(x),i_(y))” to“horizontal distance between point (i_(x),i_(y+1)) and the point(i_(x),i_(y)).” Where the function Y(a,b) returns the Y-coordinate ofthe point represented by (a,b) and the X(a,b) returns the X-coordinateof the point represented by (a,b), x1 may be calculated by solvingEquation 1, below, for x1 (the only unknown value):

$\begin{matrix}{\frac{Y_{pen} - {Y\left( {i_{x},i_{y}} \right)}}{{Y\left( {i_{x},i_{y + 1}} \right)} - {Y\left( {i_{x},i_{y}} \right)}} = \frac{{x1} - {X\left( {i_{x},i_{y}} \right)}}{{X\left( {i_{x},i_{y + 1}} \right)} - {X\left( {i_{x},i_{y}} \right)}}} & \left( {{Equation}\mspace{20mu} 1} \right)\end{matrix}$

The values x2, y1, and y2 may be calculated in similar fashion. Thereference rectangle is the resultant object bounded by lines x1, x2, y1,and y2.

Linear interpolation by proportion may be used to determine theresultant X and Y coordinates on the screen. The distance of thedetected stylus input point to the left edge of the reference rectanglemay be defined by the formula X_(pen)−x1. The width of the referencerectangle may be defined by the formula x2−x1. The distance of thetarget screen point (X_(scr),Y_(scr)) to the left edge of the screenrectangle is referred to as X_(dist). The width of the screen rectangleis referred to as S_(w). The values X_(pen), Y_(pen), x1, x2, y1, y2,S_(w), and S_(h) are known or previously calculated for each detectedstylus input point. Thus, the screen x-coordinate (X_(scr)) may becalculated by first determining X_(dist) such that the ratioX_(dist):S_(w) is equal to the ratio X_(pen)−x1:x2−x1, and then addingX_(dist) to the x-value of the left edge of the screen rectangle.Likewise, the screen y-coordinate may be calculated by first determiningY_(dist) such that the ratio Y_(dist):S_(h) is equal to the ratioY_(pen)−y1:y2−y1, and then adding Y_(dist) to y-value of the top edge ofthe screen rectangle.

As previously stated, because each sector is maximized when determiningthe sector in which a detected input point is located, the detectedinput point might not be placed in the actual sector in which it islocated. For example, with reference to FIGS. 10 and 12, detected stylusinput point 901 may be placed in either of maximized sectors G or H.FIG. 12 illustrates the resultant reference rectangle when the detectedinput point 901 is placed in sector G, instead of its actual sector H.

Placing stylus point 901 in sector G (shown bounded by the small dottedlines), the intersecting points of the stylus point to the sectorpolygon are shown as black circles. The reference rectangle is formed byusing the intersecting points as boundaries (solid lines). Thus, as isshown, the stylus point 901 may be outside of the reference rectangle.However, because the algorithm to interpolate the screen coordinates,above, is based on the ratio of the distance of the stylus point fromthe boundary lines of the reference rectangle, it may also be used toextrapolate the screen coordinates as well as interpolate them.

Although the black dotted lines of the sector polygon are slanted, theyrepresent constant values (horizontal or vertical lines) ofcorresponding edges of a screen rectangle, i.e. every point on theslanted line is equivalent to a constant X or Y value of thecorresponding edge of the screen coordinates. To calculate the resultantscreen coordinates, ratios are again used. The ratio of Dsy1:Dsy2 iscalculated to be the same as the ratio Dy1:Dy2, where Dsy1 correspondsto Y_(dist), above, and Dsy2 is the height of the screen rectangle.Similarly, the ratio of Dsx1:Dsx2 is calculated to be the same as theratio of Dx1:Dx2. Because Dx1 is larger than Dx2, the result of theratio is greater than one because the value is extrapolated instead ofinterpolated. That is, the resulting screen coordinates may also beoutside of the screen rectangle.

Calculations written in C/C++ to calculate the screen coordinatesaccording to an embodiment of the invention are shown in FIG. 13, where(i_(x), i_(y)) are the array indices of the upper left corner of themaximized sector containing the detected stylus input point in the map.

In contrast to FIG. 4, FIG. 14 shows lines drawn using a straight edgeruler on a device that performs alignment and linearity compensationaccording to the invention.

Using the above method and system, the invention adjusts the referencerectangle continuously as the given stylus point moves around in asector. When the stylus point crosses two adjacent sectors, thetransition is smooth because the reference rectangle is weighted towardthe joining edge of the adjacent sectors as it moves closer to theboundary. That is, with reference to FIG. 10, if the stylus point 901was inside of actual sector G and was very close to the left edge of thesector polygon (with y-value unchanged), the stylus point would beapproximately two-thirds down in its resultant reference rectangleversus about three-fourths down from the reference rectangle fororiginal stylus point 901 shown in FIG. 12. The reference rectanglechanges responsive to the location of the stylus point 901. As thestylus point 901 slides from the left side of the sector polygon to theright, the height of the reference rectangle constantly changes, as doesthe ratio of the stylus point to the reference rectangle. Also,adjoining sectors always have the same width and/or height due to thecommonality of the two bounding points shared by each sector. Thus thetransformation from one sector to the next is a continuous functionwithout sudden jerks when crossing a sector boundary.

Programming languages other than C/C++ may be used to perform theinvention. The instructions for performing the inventive method may bestored in one or more memories of the computer 100, such as in the harddisk 170, magnetic disk 190, optical disk 192, or other suitablecomputer readable medium, such that when the instructions are carriedout by the processing unit 110, the computer 100 is caused to perform inaccordance with the invention.

The invention as described above compensates for alignment differenceswhile it compensates for linearity errors. In addition, the alignment iscorrected regardless of whether the LCD's resolution is the same as thedigitizer's resolution by correcting the user provided input accordingto the above described method and system.

While the invention has been described with respect to specific examplesincluding presently preferred modes of carrying out the invention, thoseskilled in the art will appreciate that there are numerous variationsand permutations of the above described systems and techniques that fallwithin the spirit and scope of the invention as set forth in theappended claims.

1. A method of creating a linearity map, comprising the steps of: (i)touching a display device at a plurality of predetermined locationsdefined by a calibration grid corresponding to the display device,wherein the calibration grid is non-uniform, and the calibration gridcomprises a first area of a first calibration density and a second areaof a second calibration density different from said first calibrationdensity; (ii) detecting in a digitizer coupled to the display device,coordinates for each touched predetermined location; and (iii) recordingeach predetermined location's screen coordinates and correspondingdetected digitizer coordinates.
 2. The method of claim 1, wherein thecalibration grid is displayed on the display device.
 3. The method ofclaim 1, wherein the information recorded in step (iii) is recorded inan array.
 4. The method of claim 3, wherein the array istwo-dimensional, and each array element corresponds to an intersectionof the calibration grid.
 5. The method of claim 1, wherein thecalibration grid is non-uniform along both its X-axis and Y-axis.
 6. Amethod of creating a linearity map, comprising the steps of: (i)touching a display device at a plurality of predetermined locations;(ii) detecting on a digitizer, coordinates for each touchedpredetermined location; and (iii) recording each predeterminedlocation's screen coordinates and corresponding detected digitizercoordinates, wherein a calibration grid displayed on the display devicecoupled to the digitizer defines the predetermined locations, andwherein the calibration grid is non-uniform, and comprises a first areaof a first density and a second area of a second density.
 7. The methodof claim 6, wherein the first area corresponds to an area of higherdistortion within a data processing device, and the second areacorresponds to an area of lower distortion within the data processingdevice.
 8. The method of claim 6, wherein the information recorded instep (iii) is recorded in a non-linear array.
 9. The method of claim 6,wherein the calibration grid is non-uniform along both its X-axis andY-axis.
 10. A method of creating a linearity map, comprising the stepsof: (i) touching a display device at a plurality of predeterminedlocations defined by a calibration grid corresponding to the displaydevice, wherein the calibration grid is non-uniform, and the calibrationgrid comprises a first area of a first calibration density and a secondarea of a second calibration density different from said firstcalibration density; (ii) detecting in a digitizer coupled to thedisplay device, coordinates for each touched predetermined location; and(iii) recording each predetermined location's screen coordinates andcorresponding detected digitizer coordinates, wherein the first areacorresponds to an area of higher distortion within a data processingdevice, and the second area corresponds to an area of lower distortionwithin the data processing device.
 11. The method of claim 10, whereinthe calibration grid is displayed on the display device.
 12. The methodof claim 10, wherein the information recorded in step (iii) is recordedin an array.
 13. The method of claim 12, wherein the array istwo-dimensional, and each array element corresponds to an intersectionof the calibration grid.
 14. The method of claim 10, wherein theinformation recorded in step (iii) is recorded in a non-linear array.15. The method of claim 10, wherein the calibration grid is non-uniformalong both its X-axis and Y-axis.
 16. A computer readable medium storinga data structure of a calibration map for use with a stylus inputsystem, said data structure comprising: an array of a plurality of inputpoints, each input point corresponding to a physically identifiedposition on a display device coupled to a digitizer that receives inputvia a stylus, and each input point storing corresponding detected inputposition coordinates of a detected digitizer position when thephysically identified position corresponding to the input point isidentified by the stylus; wherein said array of points is non-uniform,and has a first area of a first calibration density and a second area ofa second calibration density different from said first calibrationdensity.
 17. The computer readable medium of claim 16, wherein the firstarea corresponds to an area of higher distortion caused by a componentwithin a data processing device housing the display device and thedigitizer.
 18. The computer readable medium of claim 16, wherein thefirst area corresponds to an area of higher distortion within a dataprocessing device, and the second area corresponds to an area of lowerdistortion within the data processing device.
 19. The computer readablemedium of claim 16, wherein the calibration grid is non-uniform alongboth its X-axis and Y-axis.